package com.beiding.service;

import com.beiding.pojo.Room;
import org.springframework.data.domain.Pageable;

import java.security.Principal;
import java.util.List;

public interface RoomStorageService {

    Room getRoom(String id);

    Room getRoomDetails( String id);

    Room save(Room room);

    Room update(Principal principal, Room room);

    void remove(Principal principal, String id);

    List<Room> nearby(double elng, double wlng, double nlat, double slat, Pageable pageable);

    void publish(Principal principal, String roomId, Boolean publishState);

    Boolean isFavorite(String name, String id);

    void favorite(String name, String id, Boolean state);

    List<Room> getFavoriteRooms(String name);

    void occupy(String id, String theUser);

    void release(String id);

    String getState(String roomId);
}
